//
// Created by Administrator on 2023/2/1.
//

#include <iostream>
using namespace std;


int main()
{
    int a,b;
    scanf("%d",&a);
    if(a>59)
    {
        b=1900+a;
    }
    if(a<=59)
    {
        b=2000+a;
    }
    printf("%d",b);
    return 0;
}